/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.View;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
/**
 *
 * @author admin
 */
public class PanelTambahPinjaman extends JPanel {
    private JLabel JudulLabel ;
    private JLabel labelKodeAnggota;
    private JTextField textKodeAnggota;
    private JLabel labelKodeKoleksi;
    private JTextField textKodeKoleksi;
    private JButton tombolSimpan;
    private JButton tombolBatal;

    public PanelTambahPinjaman (){
        setLayout(null);
        setVisible(true);

        JudulLabel = new JLabel("FORM TAMBAH PINJAMAN");
        JudulLabel.setBounds(125,5,200,40);
        add(JudulLabel);

        labelKodeAnggota = new JLabel("Kode Anggota ");
        labelKodeAnggota.setBounds(20, 80, 100, 20);
        add(labelKodeAnggota);

        textKodeAnggota = new JTextField(20);
        textKodeAnggota.setBounds(120, 80, 200, 20);
        add(textKodeAnggota);

        labelKodeKoleksi = new JLabel("Kode Koleksi");
        labelKodeKoleksi.setBounds(20, 120, 100, 20);
        add(labelKodeKoleksi);

        textKodeKoleksi = new JTextField(20);
        textKodeKoleksi.setBounds(120, 120, 200, 20);
        add(textKodeKoleksi);

        tombolSimpan = new JButton("SIMPAN ");
    tombolSimpan.setBounds(100, 170, 100, 20);
    add(tombolSimpan);
    tombolSimpan.addActionListener(new ActionListener() {
        @Override
            public void actionPerformed(ActionEvent e) {
            tombolSimpanAction();
            }
        });

    tombolBatal = new JButton("BATAL ");
    tombolBatal.setBounds(260, 170, 100, 20);
    add(tombolBatal);
    tombolBatal.addActionListener(new ActionListener() {

        @Override
            public void actionPerformed(ActionEvent e) {
            cancelCommand();
            }
        });
}
    public void tombolSimpanAction(){
        JOptionPane.showMessageDialog(this, "Data Disimpan");
    }
    private void cancelCommand(){
        System.exit(0);
    }
   
    }
